import React, { Component } from 'react';
import './Collection.scss'
import {Toast} from 'antd-mobile'
class Collection extends Component {
    constructor(props) {
        super(props)
        this.state = {
            list: []
        }
    }
    return() {
        this.props.history.go(-1)
    }
    render() {
        return (
            <div className='collection'>
                <div className="head">
                    <div className="hdtop">
                        <div className="hdlft">
                            <span className='iconfont icon-fanhui' onClick={() => { this.return() }}></span>
                        </div>
                        <div className="topz">我的收藏</div>
                        <div className="topr">
                            <div className='tb'>
                                <span className="iconfont icon-dian"></span> |
                                <span className="iconfont icon-icon-yuanxk
"></span>
                            </div>
                        </div>
                    </div>
                </div>

                <div className='sc'>

{
    this.state.list.map((item, index) => {
        return (
            <div className="good" key={item.id}>
                <div className="img">
                    <img src={item.pic} alt="" />
                </div>
                <div className="tt">
                    <div className="name">{item.name}</div>
                    <span className='fe'>{item.salesPrice.name}</span>
                    <div className="price">
                        <span>活动价{item.salesPrice.value}</span>
                        <button onClick={() => {
                            this.good_unfav(item.id, Toast.show({ icon: 'success', content: '取消收藏成功' }))
                        }}>取消收藏</button>
                    </div>
                </div>
            </div>
        )
    })
}
</div>

            </div>
        );
    }
}

export default Collection;